<template>
    <div class="container">
		<div class="bg-my" :style="'height: ' + bgHeight + 'px;'"></div>
		<navigationBar title="登录" mode="none" ></navigationBar>
		<div class="content" :style="'padding-top: ' + navigationBarHeight + 'px;'">
			<div class="user-info">
				<div class="avatar" @click="toLogin">
					<image
						:src="userInfo.avatar || '/static/logo.png'"
						alt=""
						:lazy-load="true"
					/>
				</div>
				<div class="wrap-btn">
					<button class="button title-button">恒优五星服务</button>
				</div>
				<div class="wrap-btn-bottom wrap-btn-login">
					<button class="button login-button" open-type="getUserInfo" @getuserinfo="toLogin">登录</button>
				</div>
				<div class="wrap-btn-bottom">
					<button class="button login-button" @click="toReturn">返回</button>
				</div>
				<!-- <div class="nickname">{{ userInfo.id ? userInfo.nickname : '点击登录' }}</div> -->
			</div>
		</div>
    </div>
</template>

<script>
    import data from '@/js/publics/login/data.js';
    import methods from '@/js/publics/login/methods.js';
    import {mapState} from 'vuex';
    import navigationBar from '../../components/navigationBar.vue';
    export default {
        data,
        methods,
        onLoad(e) {
        },
        onShow() {},
        onHide() {
            console.log('on hide')
        },
        onUnload() {
        },
        computed: {
        	...mapState(['navigationBarHeight', 'userInfo']),
        	bgHeight() {
        		// #ifdef APP-PLUS
        		return 250
        		// #endif
        		return this.navigationBarHeight + uni.upx2px(364);
        	}
        },
        components: {
            navigationBar,
        }
    };
</script>

<style scoped lang="scss">
    @import '~@/style/publics/login.scss';
	.tui-info {
		width: 100%;
		display: flex;
		justify-content: center;
		padding-top: 30rpx;
		flex: 1;
		font-size:30upx;
		color: #FFFFFF;
	}
	.title-button{
		font-size: medium;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		border-radius: 10rpx;
	}
</style>
